package com.github.pig.admin.model;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * <p>
 * </p>
 *
 * @author lengleng
 * @since 2017-10-29
 */
@Data
@Table(name="sys_role")
public class SysRole implements Serializable{

    private static final long serialVersionUID = 1L;

    @Column(name = "role_id")
    @Id
    private Integer roleId;
    @Column(name="role_name")
    private String roleName;
    @Column(name="role_code")
    private String roleCode;
    @Column(name="role_desc")
    private String roleDesc;
    @Column(name="create_time")
    private Date createTime;
    @Column(name="update_time")
    private Date updateTime;
    @Transient
    private String deptName;
    /**
     * 删除标识（0-正常,1-删除）
     */
    @Column(name="del_flag")
    private String delFlag;
    @Column(name="community_id")
    private String communityId;
    @Column(name="building_id")
    private String buildingId;
    @Column(name="unit_id")
    private String unitId;

    @Override
    public String toString() {
        return "SysRole{" +
                ", roleId=" + roleId +
                ", roleName=" + roleName +
                ", roleCode=" + roleCode +
                ", roleDesc=" + roleDesc +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", delFlag=" + delFlag +
                "}";
    }
}
